Skip to content

设置投放计划回调地址

投放计划创建后,如果设置了回调地址,当投放计划的状态 `plan_state` 或者审批状态 `audit_state` 发生变更时,会回调给品牌方。

请求参数类型描述
sp_mchidstring服务商商户号
jsonobject声明请求的JSON数据结构
notify_urlstring通知url地址
php
$instance->v3->marketing->partner->deliveryPlan->_sp_mchid_->notifyUrl->postAsync([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url')->postAsync([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url']->postAsync([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->deliveryPlan->_sp_mchid_->notifyUrl->post([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url')->post([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url']->post([
  'sp_mchid' => '298689900',
  'json' => [
    'notify_url' => 'https://pay.weixin.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
notify_urlstring通知地址

参阅 官方文档

Published on the GitHub by TheNorthMemory